<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>

<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="favicon.ico">
<link rel="Shortcut Icon" href="favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css"
	href="/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css"
	href="/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css"
	href="/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<title>新增会话 - 会话管理 - 故障诊断系统</title>
<meta name="keywords"
	content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description"
	content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>

<body>
	<article class="page-container">
		<form class="form form-horizontal" id="form-article-add" method="post"
			action="#" th:action="@{/Session/add-Session}">
			<input type="hidden" name="save" value="true"/>
			<div style="border-style: double; padding-bottom: 10px">
				<div style="width: 70%; padding-bottom: 30px; padding-top: 30px">
					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-2"><span
							class="c-red">*</span>会话编号：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<input type="text" class="input-text" value=""
								placeholder="请输入会话编号" id="session_num" name="sessionNum">
						</div>
					</div>
					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-2"><span
							class="c-red">*</span>数据标示符：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<input type="text" class="input-text" value=""
								placeholder="请输入数据标示符" id="getvalue_bs" name="dataNum">
						</div>
					</div>
					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-2"><span
							class="c-red">*</span>会话描述：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<input type="text" class="input-text" value=""
								placeholder="请输入会话描述" id="getvalue_bs" name="sessionDes">
						</div>
					</div>
					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-2"><span
							class="c-red">*</span>获取方式：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<select class="input-text" onchange="change(this)"
								name="sessionType">
								<option value="1">人工输入数据值</option>
								<option value="2">人工选择备选项</option>
							</select>
						</div>
					</div>
				</div>
				<div class="row cl"
					style="position: absolute; top: 50px; right: 10%; background-color: aquamarine; width: 200px">
					<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
						<button onClick="session_save();"
							class="btn btn-primary radius" type="submit"
							style="margin-bottom: 10px; width: 100px">保存</button>
						<button onClick="article_save_submit();"
							class="btn btn-primary radius" type="submit"
							style="margin-bottom: 10px; width: 100px">重置</button>
						<button onClick="removeIframe();" class="btn btn-primary radius"
							type="submit" style="margin-bottom: 10px; width: 100px">
							返回</button>
					</div>
				</div>
			</div>

			<div id="bxx"
				style="width: 100%; position: absolute; background-color: aquamarine; height: 400px; margin-top: 10px; border-style: solid">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span
						class="c-red">*</span>提示问题：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value=""
							placeholder="请输入问题提示" id="session_tip" name="sessionName"
							style="width: 50%">
					</div>
				</div>
				<div
					style="text-align: center; background-color: #fff; margin: 50px">
					<div
						style="width: 65%; padding: 10px; padding-top: 50px; padding-bottom: 50px">
						<div class="row cl" style="margin-bottom: 50px">
							<label class="form-label col-xs-4 col-sm-2"><span
								class="c-red">*</span>备选文本：</label>
							<div class="formControls col-xs-8 col-sm-9">
								<input type="text" class="input-text" value=""
									placeholder="请输入备选文本" id="session_value" name="session_value">
							</div>
						</div>
						<div class="row cl">
							<label class="form-label col-xs-4 col-sm-2"><span
								class="c-red">*</span>数值代码：</label>
							<div class="formControls col-xs-8 col-sm-9">
								<input type="text" class="input-text" value=""
									placeholder="请输入数值代码" id="value_bs" name="value_bs">
							</div>
						</div>
					</div>
					<div
						style="width: 20%; padding: 10px; padding-top: 27px; padding-bottom: 27px; position: absolute; right: 20%; bottom: 20%; background-color: bisque">
						<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
							<button onClick="removeIframe();" class="btn btn-default radius"
								type="button" style="margin: 10px">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</button>
							<button onClick="removeIframe();" class="btn btn-default radius"
								type="button" style="margin: 10px">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</button>
							<button onClick="removeIframe();" class="btn btn-default radius"
								type="button" style="margin: 10px">&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;</button>
						</div>
					</div>
					<div
						style="width: 20%; position: absolute; right: 5%; bottom: 20%; background-color: chartreuse">
						<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2"
							style="width: 100%">
							<div
								style="background-color: cornflowerblue; height: 200px; overflow: auto">
								<ul>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
									<li
										style="display: block; height: 30px; text-decoration: none; color: #fff;">123</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div id="sjz"
				style="width: 100%; position: absolute; background-color: aquamarine; height: 400px; margin-top: 10px; border-style: solid">
				<div class="row cl" style="margin-top: 100px">
					<label class="form-label col-xs-4 col-sm-2"><span
						class="c-red">*</span>数据项名称：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" value=""
							placeholder="请输入数据项名称" id="data_name" name="dataName"
							style="width: 50%">
					</div>
				</div>
			</div>
		</form>
	</article>

	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="/lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src="/h-ui/js/H-ui.js"></script>
	<script type="text/javascript" src="/h-ui.admin/js/H-ui.admin.page.js"></script>
	<!--/_footer /作为公共模版分离出去-->

	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript"
		src="/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
	<script type="text/javascript"
		src="/lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript"
		src="/lib/jquery.validation/1.14.0/messages_zh.js"></script>
	<script>
		//会话保存
		function session_save() {
			sessionAnswer = "";
			lis = $("li");
			for (var i = 0; i < lis.length; i++) {
				sessionAnswer += lis.eq(i).val();
			}
			param = {
				"sessionAnswer" : sessionAnswer
			};
			console.log("添加前");
			$("#form-article-add").validate({
				rules : {
					sessionNum : {
						required : true,
					},
					sessionDes : {
						required : true,
					},
					sessionType : {
						required : true,
					},
					sessionDes : {
						required : true,
					},
					dataNum: {
						required : true,
					},
				},
				onkeyup : false,
				focusCleanup : true,
				beforeSend : function() {
					//发送之前的动作
					console.log("添加后");
				},
				data : JSON.stringify(param),
				success : "valid",
				
				submitHandler : function(form) {
					//$(form).ajaxSubmit();
					console.log("添加成功");
					form.submit();
					parent.location.reload();
					/* var index = parent.layer.getFrameIndex(window.name); */
					//parent.$('.btn-refresh').click();
					/* parent.layer.close(index); */
				}
			});
		}
		//列表框获取方式
		function change(obj) {
			var vs = $('select  option:selected').val();
			$("#sjz").hide();
			$("#bxx").hide();
			if (vs == "1") {

				$("#sjz").show(); //数据值
				$("#bxx").hide(); //备选项
			} else {
				$("#sjz").hide();
				$("#bxx").show();
			}

		};
	</script>
	<!--/请在上方写此页面业务相关的脚本-->
</body>

</html>
<!--_meta 作为公共模版分离出去-->